﻿<UserControl x:Class="BallOnTiltablePlate.JanRapp.Controls.RectBox"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:BallOnTiltablePlate.JanRapp.Controls" 
             mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="400"
             FocusManager.IsFocusScope="True"
             FocusManager.FocusedElement="{Binding ElementName=Xud}">
    <UserControl.Resources>
        <Style TargetType="local:DoubleBox">
            <Setter Property="SmallChange"
                    Value="{Binding SmallChange, RelativeSource={RelativeSource AncestorType=local:RectBox}}"/>
            <Setter Property="RegularChange" 
                    Value="{Binding RegularChange, RelativeSource={RelativeSource AncestorType=local:RectBox}}"/>
            <Setter Property="LargeChange" 
                    Value="{Binding LargeChange, RelativeSource={RelativeSource AncestorType=local:RectBox}}"/>
            <Setter Property="Value" Value="0.00"/>
        </Style>
    </UserControl.Resources>
    <StackPanel Orientation="Horizontal">
        <local:DoubleBox 
            ValueChanged="Input_ValueChanged"
            Text=" X:" x:Name="XUD"
            />
        <local:DoubleBox 
            ValueChanged="Input_ValueChanged"
            Text=" Y:" x:Name="YUD"
            />
        <local:DoubleBox 
            ValueChanged="Input_ValueChanged"
            Text=" Width:" x:Name="WidthUD"
            />
        <local:DoubleBox 
            ValueChanged="Input_ValueChanged"
            Text=" Height:" x:Name="HeightUD"
            />
    </StackPanel>
</UserControl>
